Skip to content

[snap-account-service] Remove extra account-tree-controller dep - #9493

Merged
mcmire merged 1 commit into
mainfrom
remove-extra-account-tree-controller-dep
Jul 13, 2026
Merged

[snap-account-service] Remove extra account-tree-controller dep#9493
mcmire merged 1 commit into
mainfrom
remove-extra-account-tree-controller-dep

Conversation

@mcmire

@mcmire mcmire commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Explanation

In a future commit, we want to automatically synchronize the references field in each package's tsconfig files with its dependencies. Currently, we would have to make an exception for snap-account-service, as it lists account-tree-controller as a dependency but purposefully excludes it from its tsconfig files to avoid a circular reference. However, this manual bookkeeping is unnecessary, as snap-account-service already works around the circular dependency by copying types from account-tree-controller instead of importing them. So the dependency is unnecessary and we can drop it from snap-account-service's package.json.

References

Unblocks #8384.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Dependency and documentation-only change; no runtime or API code changes, with types already duplicated locally.

Overview
Removes @metamask/account-tree-controller from @metamask/snap-account-service’s declared dependencies and updates the monorepo dependency graph (README.md, yarn.lock). The package already avoids importing that controller and uses locally mirrored types in src/types.ts to break the account-tree-controllermultichain-account-servicesnap-account-service cycle.

The long tsconfig comments that documented why account-tree-controller was omitted from project references are deleted now that the npm dependency no longer exists—references stay limited to keyring-controller and messenger. This aligns package.json with actual build/runtime usage so future automation can sync tsconfig references from dependencies without a special-case exception.

Reviewed by Cursor Bugbot for commit b7c3e84. Bugbot is set up for automated code reviews on this repo. Configure here.

@mcmire
mcmire force-pushed the remove-extra-account-tree-controller-dep branch from fa5ce20 to 00fd12b Compare July 13, 2026 17:30
In a future commit, we want to automatically synchronize the
`references` field in each package's tsconfig files with that package
dependencies. Currently, we would have to make an exception for
`snap-account-service`, as it lists `account-tree-controller` as a
dependency but purposefully excludes it from its tsconfig files to avoid
a circular reference. However, this manual bookkeeping is unnecessary,
as `snap-account-service` already works around the circular
dependency by copying types from `account-tree-controller` instead of
importing them. So the dependency is unnecessary and we can drop it from
`package.json`, thereby unlocking `package.json`<->tsconfig syncing.
@mcmire
mcmire force-pushed the remove-extra-account-tree-controller-dep branch from 00fd12b to b7c3e84 Compare July 13, 2026 17:34
@mcmire
mcmire marked this pull request as ready for review July 13, 2026 17:51
@mcmire
mcmire requested review from a team as code owners July 13, 2026 17:51
@mcmire
mcmire temporarily deployed to default-branch July 13, 2026 17:52 — with GitHub Actions Inactive
@mcmire
mcmire added this pull request to the merge queue Jul 13, 2026
Merged via the queue into main with commit 814d9ff Jul 13, 2026
425 checks passed
@mcmire
mcmire deleted the remove-extra-account-tree-controller-dep branch July 13, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants